<div class="payment_top">
    <a ui-sref="homepage"><img class="backImg" src="images/leftarrow.png"></a>
    <span>促销管理</span>

    <div class="backBtn_right" ng-click="vm.edit()" ng-hide="vm.isEdit">编辑
    </div>
    <div class="backBtn_right" ng-show="vm.isEdit" ng-click="vm.deleteImages()">确认</div>
</div>

<div class="recommend_item">

    <ul class="recommend_content">
        <li class="recommend_detail" ng-repeat="food in vm.foodinfo" ng-click="vm.stateGo(food.foodid)">
            <div class="recommend_text">推荐菜品{{food.positionid}}&nbsp;(播放时长：{{food.foodtime}}秒)</div>
            <div class="recommend_paint">
                <img class="recommend_img" ng-src="{{food.foodurl}}" alt="">
            </div>
            <div class="recommend_edit" ng-show="vm.isEdit">
                <div ng-click="vm.up($index)"><img ng-src="{{$index==0?'images/up.png':'images/up_02.png'}}"></div>
                <div class="div" ng-click="vm.remove($index)"><img ng-src="images/food_delete.png"></div>
                <div ng-click="vm.down($index)" ng-touchstart="vm.unDrag()"><img
                        ng-src="{{$index==(vm.foodinfo.length-1)?'images/down_02.png':'images/down.png'}}"></div>
            </div>
        </li>
        <li class="recommend_detail" ng-show="vm.showrecommended&&!vm.isEdit">

            <div class="recommend_text">
                <span>推荐菜品</span>
                <small style="color: #a7a7a7">(请上传小于4M的图片,至多5张)</small>
            </div>
            <div class="recommend_paint ">
                <img class="recommend_img" style="position: absolute" src="images/upload.png">
                <input type="file" ngf-select ng-model="vm.foodurl" name="file"
                       ng-change="vm.uploadLogo(vm.foodurl,$event)">
            </div>
        </li>
    </ul>
</div>
<message-Component message-visible="vm.messageVisible" message="vm.message"  surebtn="vm.sureBtn()"
                   cancelbtn="vm.cancelBtn()"></message-Component>